package com.bluegalaxy.nhb.domain.enums;

/**
 * @Auther: nanhb
 * @Date: 2020-03-18 10:53
 * @Description:
 */
public enum UsersFieldEnum {

    DTYPE("dtype", "user_type"),
    ID("id","login_id"),
    IS_ENABLED("is_enabled","is_deleted"),
    DEPARTMENT("department","group_name"),
    mobile("mobile","phone_number"),
    username("username","name"),
    balance("balance","banlance_of_account"),
    phone("phone","consultant_phone"),
    birth("birth","birthday"),
    point("point","credit"),
    area_id("area_id","zone"),
    member_rank_id("member_rank_id","vip_level"),

    ;

    // 成员变量
    private String operCode;
    private String operValue;

    // 构造方法
    private UsersFieldEnum(String operCode, String operValue) {
        this.operCode = operCode;
        this.operValue = operValue;
    }

    public static String getValue(String operCode) {
        for (UsersFieldEnum c : UsersFieldEnum.values()) {
            if (c.getOperCode().equals(operCode)) {
                return c.getOperValue();
            }
        }
        return operCode;
    }

    public String getOperCode() {
        return operCode;
    }

    public void setOperCode(String operCode) {
        this.operCode = operCode;
    }

    public String getOperValue() {
        return operValue;
    }

    public void setOperValue(String operValue) {
        this.operValue = operValue;
    }
}
